<?php
	//开启session;
	session_start();

	//var_dump($_SERVER);
	//var_dump(__FILE__);

	//定义一个网站的path,linux命令下\替换为/
	$path=str_replace('\\', '/', dirname(__FILE__));	
	define('PATH', $path);

	//定义一个网站的url
	$url=strtolower(explode('/', $_SERVER['SERVER_PROTOCOL'])[0]).'://'.$_SERVER['SERVER_NAME'];
	//var_dump($url);

	//(D:/wamp/www)被替换成(http://ip地址)
	$app=str_replace($_SERVER['DOCUMENT_ROOT'], $url, $path);
	define('URL', $app);
	
	//导入配置文件和函数库
	include PATH.'/include/config.php';
	include PATH.'/include/func.php';




?>